package com.atguigu.eduservice.controller;

import com.atguigu.commonutils.R;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/eduservice/user")
@CrossOrigin //解决跨域访问
public class EduLoginController {

    @PostMapping("/login")
    public R login(){
        return R.ok().data("token","admin");
    }

    @GetMapping("/info")
    public R info(){
        return R.ok().data("roles","[admin]").data("name","admin").data("avatar","https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=d&word=%E8%89%BE%E4%BC%A6&step_word=&hs=0&pn=0&spn=0&di=208450&pi=0&rn=1&tn=baiduimagedetail&is=0%2C0&istype=2&ie=utf-8&oe=utf-8&in=&cl=2&lm=-1&st=-1&cs=2133654591%2C1965539024&os=1445607031%2C2853152185&simid=3326267638%2C292101640&adpicid=0&lpn=0&ln=1785&fr=&fmq=1625211285299_R&fm=result&ic=&s=undefined&hd=&latest=&copyright=&se=&sme=&tab=0&width=&height=&face=undefined&ist=&jit=&cg=&bdtype=0&oriquery=&objurl=https%3A%2F%2Fgimg2.baidu.com%2Fimage_search%2Fsrc%3Dhttp%3A%2F%2Fc-ssl.duitang.com%2Fuploads%2Fitem%2F202003%2F27%2F20200327104819_KTt2m.thumb.400_0.jpeg%26refer%3Dhttp%3A%2F%2Fc-ssl.duitang.com%26app%3D2002%26size%3Df9999%2C10000%26q%3Da80%26n%3D0%26g%3D0n%26fmt%3Djpeg%3Fsec%3D1627803286%26t%3Dfe3f1ed36b1b33762712916b0d04f4f1&fromurl=ippr_z2C%24qAzdH3FAzdH3Fooo_z%26e3B17tpwg2_z%26e3Bv54AzdH3Fwsk74AzdH3F%3Ft1%3Dlbac9cl0%26fr4%3Dda89_z%26e3B8dccnmbb_z%26e3Bdad_z%26e3Ba&gsm=1&rpstart=0&rpnum=0&islist=&querylist=&nojc=undefined");
    }
}
